<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <style>
		.form-group{
			width: 310px;
			height: 470px;
			margin: 0 auto;
		}
		.btn-info{
			margin-top: 10px
		}
	</style>
    <title>事项查询</title>
    
	<link rel="stylesheet" href="/lzproject/CSS/bootstrap.min.css">  
	<script src="/lzproject/Js/jquery.min.js"></script>
	<script src="/lzproject/Js/bootstrap.min.js"></script>

  </head>
  
  <body>	    
	<form role="form" id="form">
		<div class="form-group">
			<br>
			<br>
			<label for="name">事项状态</label>
			<select class="form-control" name="status">
				<option value="0">等待领导审批</option>
				<option value="1">审批通过</option>
				<option value="2">审批不通过</option>
				<option value="3">已注销</option>
			</select>
			<label for="name">事项类型</label>
			<select class="form-control" name="type">
				<option value="1">区级督察事项</option>
				<option value="2">市级督察事项</option>
				<option value="3">重点项目</option>
				<option value="4">中心工作</option>
			</select>
			<!-- <label for="name">立项人</label>
			<select class="form-control" >
				<option>admin</option>
				<option>Duzhili</option>
			</select>   -->
	    	<label for="name">事项名</label>
	    	<input type="text" class="form-control" placeholder="请输入事项名称" name="sx_name">
	    	<input type="button" class="btn btn-info" id="btn" value="开始查询">
		</div>
	</form>
	
	
<table class="table table-bordered">
  <caption>查询结果</caption>
  <thead>
    <tr>
      <th>事项名</th>
      <th>事项类型</th>
      <th>事项创建人</th>
      <th>事项合作企业</th>
      <th>事项状态</th>
      <th>建立时间</th>
    </tr>
  </thead>
  <tbody id="tbody">
    
    
  </tbody>
</table>
	
	<script type="text/javascript">
	   jQuery("#btn").click(function(){
         $.ajax({
                type:'GET',
                url:'/lzproject/sx/get.do',
                dataType: 'json',
                data: $('#form').serialize(),
                cache:false,
                success: function(data1){   
                var carNewsList = "";
                var data = data1.data;
                $.each(data, function(index, element) {
                    carNewsList += "<tr><td>" +element.sx_name+"</td><td>"+element.sx_type+"</td><td>"+element.sx_founder+
                    "</td><td>"+element.sx_enterprice+"</td><td>"+element.sx_status+"</td><td>"+element.sx_found_timestape+"</td></tr>";
                });
               
               $("#tbody").html(carNewsList);        //数据在<ul id="leftCarInformationList"></ul>里面显示
            },
            error: function(obj){
                alert("return error:"+obj);
            },    
      });
        
    }); 
	</script>
  </body>
</html>
